   Help for SoundX

Properties

Registration Information

Order Form

Getting Custom Controls Written

Description

This control provides Soundex and Metaphone algorithms.  Soundex and Metaphone convert words or names to codes that represent how they sound.  This can be really useful in a database application where users need to find names they may not know how to spell exactly.

SoundX generates Soundex and Metaphone codes from words supplied to it.  You can use this codes to make database searching easier for your users.

To generate the code, simply set the Word propWord property with the word or name you want a code back for.  When you do this, SoundX generates the codes for all three of the algorithms (Soundex, Extended Soundex, and Metaphone).  All you have to do is read the appropriate property: Soundex, ExtSoundex, or Metaphone.

File Name

SOUNDX1.VBX

Object Type

SoundX

Remarks

When the Enabled property is set to True (default), SoundX automatically starts sending menu event notification messages when the user selects menu items at run-time.

SoundX should be placed on all forms where its functionality is required (including MDI forms and children).  SoundX can be placed directly on an MDI form.

About the Soundex Algorithm

Soundex is an algorithm developed and patented by Margaret Odell and Robert Russell in the early part of this century (U.S. Patent 1,261,167 (1918) and 1,435,663 (1922)).  Dont worry about the patents, theyve long since expired.

Many articles have been written about it, but the best description Ive seen so far is by Donald Knuth in The Art of Computer Programming, Vol. 3.

Soundex converts a word or name to a code comprised of a letter followed by three digits.  Some redundancy is taken out of the word (such as stripping vowels, consonant doubles, etc.).  The first letter is preserved and the code is generated from what remains.

About the Extended Soundex Algorithm

This is a minor change to the basic Soundex algorithm.  In this algorithm, the first letter is treated like all the rest of the letters (i.e., if its a vowel, its stripped, if its part of a consonant double, the second is stripped (as in LLAMA), etc.).

This code is purely numeric.  This can result in faster database scans to pick out like-sounding words or names.

About the Metaphone Algorithm

Quite frankly, I dont know where Metaphone came from.  I got some source code from a friend a few years ago in my E-mail with the comment attached to it: Try this, its cool!

Well, I thought so, thats why it has been included in SoundX.  Metaphone does a better job than Soundex and Extended Soundex when it comes to representing like-sounding names.  Its drawback is that Metaphone is comprised purely of letters.  In other words, it takes up more storage and, in a large database, this can be costly.

This implementation only returns the first four (4) characters of the Metaphone string generated.  The code will generate more than that, but after some experimentation, this seemed like an ideal compromise between accuracy and storage space.

Distribution Note     When you develop and distribute an application that uses SoundX, you should install the file SOUNDX1.VBX into the users Windows SYSTEM directory.  SoundX has version information built into it.  So, during installation, you should ensure that you are not overwriting a newer version of SoundX.


Properties

All of the properties that apply to this control are in this table.  Properties that have special meaning for this control or that only apply to this control are marked with an asterisk (*).

Align	Name

Enabled	*Soundex

*ExtSoundex	Tag

Left	Top

*Metaphone	*Word

Enabled is the default value for the control.


ExtSoundex Property

See Also	Example

Description

Extended Soundex representation of the Word property.

Usage

[form.][control.]ExtSoundex

Remarks

When the Word property is set, this property is generated.  This property is the Extended Soundex equivalent of the Word property.  This property is read-only.

Data Type

String


See Also

Properties:

Metaphone

Soundex

Word


ExtSoundex Property Example

In this example, the program will take a word entered by the user and display the extended Soundex equivalent. To try this example, paste the code into the Declarations section of a form that contains a text box, a label, and a SoundX control.  Press F5.  Then, try various words in the text box.

Sub Edit1_Change ()

   SoundX1.Word = Edit1.Text

   Label1.Caption = SoundX1.ExtSoundex

End Sub


Metaphone Property

See Also	Example

Description

Metaphone representation of the Word property.

Usage

[form.][control.]Metaphone

Remarks

When the Word property is set, this property is generated.  This property is the Metaphone equivalent of the Word property.  This property is read-only.

Data Type

String


See Also

Properties:

ExtSoundex

Soundex

Word


Metaphone Property Example

In this example, the program will take a word entered by the user and display the Metaphone equivalent. To try this example, paste the code into the Declarations section of a form that contains a text box, a label, and a SoundX control.  Press F5.  Then, try various words in the text box.

Sub Edit1_Change ()

   SoundX1.Word = Edit1.Text

   Label1.Caption = SoundX1.Metaphone

End Sub


Soundex Property

See Also	Example

Description

Soundex representation of the Word property.

Usage

[form.][control.] Soundex

Remarks

When the Word property is set, this property is generated.  This property is the Soundex equivalent of the Word property.  This property is read-only.

Data Type

String


See Also

Properties:

ExtSoundex

Metaphone

Word


Soundex Property Example

In this example, the program will take a word entered by the user and display the Soundex equivalent. To try this example, paste the code into the Declarations section of a form that contains a text box, a label, and a SoundX control.  Press F5.  Then, try various words in the text box.

Sub Edit1_Change ()

   SoundX1.Word = Edit1.Text

   Label1.Caption = SoundX1.Soundex

End Sub


Word Property

See Also	Example

Description

Seed word for Soundex, ExtSoundex, and Metaphone properties.

Usage

[form.][control.] Word [ = word$ ]

Remarks

When this property is set, SoundX uses the appropriate algorithms to generate the Soundex, ExtSoundex, and Metaphone properties.

Data Type

String


See Also

Properties:

ExtSoundex

Metaphone

Soundex


Word Property Example

In this example, the program will take a word entered by the user and display the Soundex, Extended Soundex, and Metaphone equivalents. To try this example, paste the code into the Declarations section of a form that contains a text box, a wide label, and a SoundX control.  Press F5.  Then, try various words in the text box.

Sub Edit1_Change ()

   Dim S As String

   SoundX1.Word = Edit1.Text

   S = "Soundex:" & SoundX1.Soundex

   S = S & "    ExtSoundex:" & SoundX1.ExtSoundex

   S = S & "    Metaphone:" & SoundX1.Metaphone

   Label1.Caption = S

End Sub


Registration Information

Credits

SoundX was written by James Shields.  Inquiries can be sent to 71231,2066 on CompuServe, or mabry@halcyon.com on Internet.  If you must send something via U.S. Mail, the address is:

Mabry Software

Post Office Box 31926

Seattle, WA  98103-1926

Mabry Software Products are handled in the UK by

Springfield Publishing Ltd

Springfield House

Llanfynydd

WREXHAM

Clwyd  LL11 5HW

Registration

You can register this program for  £9.95 + P&P (£1.95 UK, £3.00 EEC £4.00 Rest of the World).

For your convenience, an order form has been provided that you can print out directly from help.

Source Code and Registration

Source code (which includes a registered copy) to this control is available for £33.95 + P&P (£1.95 UK, £3.00 EEC £4.00 Rest of the World)..  With source code you get a registered version of the control.

Credit Card Orders

You can order this program with Mastercard, Access or Visa from Springfield Publishing Ltd. either by writing to the above address or by:

Telephone 	(01352) 770049

Fax	(01352) 770816

INTERNET	mabry@sprsoft.demon.co.uk

CompuServe	100273,2006

© Copyright 1993-1994 by James Shields


Order Form
 SoundX Order Form

Use the Print Topic.. command from the File menu to print this order form.

Mail this	Springfield Publishing Ltd	Telephone: (01352) 770049

form to:	Springfield House	Fax (01352) 770816

Llanfynydd 	Internet: mabry@sprsoft.demon.co.uk

WREXHAM	Compuseve 100273,2006

Clwyd   LL11 5HW

Where did you get this copy of Soundx ? ________________________________________

Ship to:	____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

Phone:	_________________________________________________________________

Fax:	_________________________________________________________________

E-Mail:	_________________________________________________________________

Disk Size:	_____________________________

Quantity

________	£  9.95 Registration

________	£33.95 Registration + Source Code

________	Postage & Packing (£1.95 UK  £3.00 Europe £4.00 Rest of World)

________	TOTAL

____	Please Debit my Visa/Mastercard  No __________________________   Exp ___

____	I Enclose a Cheque/PO made payable to Springfield Publishing Ltd


Getting Custom Controls Written

If you or your organization would like to have custom controls written, you can contact me at the following:

James Shields

Mabry Software

Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272

BBS: WinDev BBS 206-634-0783

CompuServe: 71231,2066

Internet: mabry@halcyon.com